// let getAge = () => {
//     alert(this)
// return new Date().getFullYear() - this.bornYear;
// }

//必须这种传统写法，箭头函数会出错，估计原因是箭头函数this一直指向window？
function getAge(){
    alert(this)
    return new Date().getFullYear() - this.bornYear;
}


let jack = {
name:"jack",
bornYear:2000,
age:getAge
}

console.log(getAge.apply(jack,[]));
